import { Observable } from 'rxjs';

export function checkPwdFn(pwd: string) {
  return new Observable((obs) => {
    setTimeout(() => {
      const reg = new RegExp('[A-Z]');
      if (reg.test(pwd)) {
        obs.next('pass');
      } else {
        obs.next('密码必须包含一个大写字母');
      }
      obs.complete();
    }, 1000);
  });
}
